import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

  const routes = [
    {
      path: '/',
      redirect: '/index'
    },
    {
        path: '/index',
        name: 'index',
        component: () =>
            import('@/views/index/index.vue'),
        meta: {
            footer: true,
            title: '每时每课'
        }
    },
    {
      path: '/aa',
      name: 'aa',
      component: () =>
          import('@/views/index/aa.vue'),
      meta: {
          footer: true,
          title: '课程详情'
      }
    },
    {
      path: '/member',
      name: 'member',
      component: () =>
          import('@/views/index/member.vue'),
      meta: {
          footer: true,
          title: '课程详情'
      }
    },
    {
      path: '/star',
      name: 'star',
      component: () =>
          import('@/views/index/star.vue'),
      meta: {
          footer: true,
          title: '课程详情'
      }
    },
    {
      path: '/StudyCalendar',
      name: 'StudyCalendar',
      component: () =>
          import('@/views/index/StudyCalendar.vue'),
      meta: {
          footer: true,
          title: '学习日历'
      }
    },
    {
      path: '/course',
      name: 'course',
      component: () =>
          import('@/views/course/course.vue'),
      meta: {
          footer: true,
          title: '特色课'
      }
    },
    {
      path: '/Search',
      name: 'Search',
      component: () =>
          import('@/views/course/Search.vue'),
      meta: {
          footer: true,
          title: '特色课--搜索'
      }
    },
    {
      path: '/coursedata',
      name: 'coursedata',
      component: () =>
          import('@/views/course/compon/coursedata.vue'),
      meta: {
          footer: true,
          title: '课程详情'
      }
    },
    {
      path: '/PictureCourseDetail',
      name: 'PictureCourseDetail',
      component: () =>
          import('@/views/course/compon/PictureCourseDetail.vue'),
      meta: {
          title: '图文课详情'
      },
    },
    {
      path: '/video',
      name: 'video',
      component: () =>
          import('@/views/course/compon/Video.vue'),
      meta: {
          title: '视频'
      }
    },
    {
      path: '/record',
      name: 'record',
      component: () =>
          import('@/views/record/record.vue'),
      meta: {
          footer: true,
          title: '约课记录'
      }
    },
    
    {
      path: '/practise',
      name: 'Practise',
      component: () =>
          import('@/views/practise/practise.vue'),
      meta: {
          footer: true,
          title: '练习',
  
      }
    },
    {
      path: '/point',
      name: 'Point',
      component: () =>
          import('../views/practise/compon/Point.vue'),
      meta: {
          title: '题库选择',
      }
    },//题库结束
    {
      path: '/my',
      name: 'my',
      component: () =>
        import('@/views/my/my.vue'),
      meta:{
        requtreAuth:true,
        title:"我的"
      }
    },
    {
      path: '/info',
      name: 'info',
      component: () =>
        import('@/views/my/info.vue'),
      meta:{
        requtreAuth:true,
        title:"个人信息"
      }
    },
    {
      path: '/oto',
      name: 'oto',
      component: () =>
        import('@/views/my/oto.vue'),
      meta:{
        requtreAuth:true,
        title:"约课信息"
      }
    },
    {
      path: "/mystudy",
      name: "mystudy",
      component: () => import("../views/my/mystaus.vue"),
      meta:{
        title:"我的学习"
      }
    },
    {
      path: "/my-currency",
      name: "my-currency",
      component: () => import("../views/my/MyCurrency.vue"),
      meta:{
        title:"我的余额"
      }
    },
    {
      path: '/concern',
      name: 'Concern',
      component: () =>
          import('../views/my/Concern.vue'),
      meta: {
          title: '我的关注'
      },
    },
    {
      path: '/Collect',
      name: 'Collect',
      component: () =>
          import('../views/my/Collect.vue'),
      meta: {
          title: '我的收藏'
      },
    },
    {
      path: '/Order',
      name: 'Order',
      component: () =>
          import('../views/my/Order.vue'),
      meta: {
          title: '订单'
      },
    },
    {
      path: '/Coupon',
      name: 'Coupon',
      component: () =>
          import('../views/my/Coupon.vue'),
      meta: {
          title: '优惠券'
      },
    },
    {
      path: '/Card',
      name: 'Card',
      component: () =>
          import('../views/my/card/Card.vue'),
      meta: {
          title: '我的学习卡'
      },
    },
    {
      path: '/exchange',
      name: 'Exchange',
      component: () =>
          import('../views/my/card/Exchange.vue'),
      meta: {
          title: '学习卡兑换'
      }
    },
    {
      path: '/Vip',
      name: 'Vip',
      component: () =>
          import('../views/my/Vip.vue'),
      meta: {
          title: '会员'
      },
    },
    {
      path: '/Message',
      name: 'Message',
      component: () =>
          import('../views/my/message/Message.vue'),
      meta: {
          title: '我的信息'
      },
    },
    {
      path: '/MessageDetail',
      name: 'MessageDetail',
      component: () =>
          import('../views/my/message/MessageDetail.vue'),
      meta: {
          title: '我的信息'
      },
    },
    {
      path: '/Feedback',
      name: 'Feedback',
      component: () =>
          import('../views/my/Feedback.vue'),
      meta: {
          title: '意见反馈'
      },
    },
    {
      path: '/options',
      name: 'options',
      component: () =>
          import('../views/my/Options.vue'),
      meta: {
          title: '设置'
      },
    },
    {
      path: "/custmoer",
      name: "custmoer",
      component: () => import("../views/my/customer.vue"),
      meta:{
        title:"我的学习"
      }
    },
    {
      path: '/login',
      name: 'login',
      component: () =>
          import('@/views/login/login.vue'),
      meta:{
        footer: true,
        title:"登录"
      }
    },
    {
      path: '/set-new-pass',
      name: 'SetNewPass',
      component: () =>
          import('../views/login/ForgetPass.vue'),
      meta: {
          title: '设置密码'
      }
    },
    {
      path: '/smslogin',
      name: 'smslogin',
      component: () =>
          import('@/views/login/compon/sms-login.vue'),
      meta:{
        footer: true,
        title:"注册"
      }
    },
    {
      path: '/person',
      name: 'person',
      component: () =>
          import('@/views/login/compon/Person.vue'),
      meta:{
        footer: true,
        title:"注册"
      }
    },
    {
      path: '/setpass',
      name: 'setpass',
      component: () =>
          import('@/views/login/compon/setpass.vue'),
      meta:{
        footer: true,
        title:"密码设置"
      }
    },
    {
      path: '/setmessage',
      name: 'setmessage',
      component: () =>
          import('@/views/login/compon/setmessage.vue'),
      meta:{
        footer: true,
        title:"信息填写"
      }
    },
    {
      path: '/set-info',
      name: 'set-info',
      component: () =>
          import('@/views/login/compon/SetInfo.vue'),
      meta: {
          title: '修改昵称'
      },
    },
    
  // {
  //   path: '/',
  //   name: 'Home',
  //   component: Home
  // },
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
